package cn.iocoder.yudao.module.member.bonus.mq;

import cn.hutool.extra.spring.SpringUtil;
import cn.iocoder.yudao.module.api.member.bonus.message.BonusOrderPaidMessage;
import cn.iocoder.yudao.module.api.member.bonus.vo.BonusOrderVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 *  这里是文件说明
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/05/14
 */
@Component
@Slf4j
public class BonusProducer {

    public void sendBonusOrderPaidMessage(BonusOrderVO order) {
        log.info("sendBonusOrderPaidMessage: {}", order);
        SpringUtil.getApplicationContext().publishEvent(new BonusOrderPaidMessage(order));
    }

}
